package com.javasm.error;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @className: ExceptionEnum
 * @description
 * @author: gfs
 * @date: 2024/7/3 14:48
 * @version: 0.1
 * @since : jdk11
 */
@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ExceptionEnum {

    //登录异常
    LoginError(1001,"登录异常"),
    NotLoginError(1002,"未登录异常"),
    LoginUserError(1003,"登录用户异常"),
    RegUserError(1004,"注册用户异常"),
    TokenExpError(1005,"Token失效异常"),
    EmailSendError(1006,"邮件发送失败"),
    CodeError(1007,"验证码错误"),
    UserError(1008,"用户异常"),
    UserAlreadyExists(1009,"用户已经存在"),
    PhoneAlreadyExists(1010,"手机号已绑定"),
    CodeSendError(1011,"验证码发送异常"),
    //参数异常
    Parameter_Null(2001,"参数异常"),
    Dynamic_Send_Error(3001,"动态发布异常"),
    //商品数量不足
    Goods_Less(5001,"商品数量不足"),
    Task_Start_Error(6001,"定时任务启动失败"),

    UpdateError(7001,"更新失败" ),
    DeleteError(7002,"删除失败" ),
    SelectError(7003,"查询失败" );
    private Integer code;
    private String msg;
}
